<div class="BodyContainer">
	<script language="JavaScript" type="text/javascript">

		$(document).ready(function(){
			if ((FV('frontendUser') != '') && (FV('frontendPass') != '')) {
				$('#frontendToggle').attr("checked","checked");
				$('#frontaccess').show();
			} else {
				// If either of the frontend credential settings are false then
				// set them both to blank - it makes it clearer that auth is
				// disabled if we do that
				$('#frontendToggle').attr("checked","");
				$('#frontaccess').hide();
				document.getElementById('frontendUser').value = '';
				document.getElementById('frontendPass').value = '';
			}

			if ((FV('bannedPeriod') != '') && (FV('bannedRetried') != '')) {
				$('#enableLoginSecurity').attr("checked","checked");
				$('#loginsecurity').show();
			} else {
				// If either of the frontend credential settings are false then
				// set them both to blank - it makes it clearer that auth is
				// disabled if we do that
				$('#enableLoginSecurity').attr("checked","");
				$('#loginsecurity').hide();
				document.getElementById('bannedPeriod').value = '';
				document.getElementById('bannedRetried').value = '';
			}

			if (isEmbeddedTemplate()) {
				document.getElementById('tHeader').disabled = false;
				document.getElementById('tFooter').disabled = false;
				$('#tHeaderRow').show();
				$('#tFooterRow').show();
				$('#clickpreview').hide();
			} else {
				document.getElementById('tHeader').disabled = true;
				document.getElementById('tFooter').disabled = true;
				$('#tHeaderRow').hide();
				$('#tFooterRow').hide();
			}
			if (document.getElementById('ldapEnabled')) {
					ToggleLdapSettings(document.getElementById('ldapEnabled'));
			}
			if (document.getElementById('ldapEnableGroupMapping')) {
					ToggleLdapGroupSettings(document.getElementById('ldapEnableGroupMapping'));
			}
			if (document.getElementById('enableAttachmentSearch0').checked) {
					$('#indexPlugins').show();
			} else {
					$('#indexPlugins').hide()
			}
			if (%%GLOBAL_ManualFullTextPopulation%% && (document.getElementById('defaultSearchType').value == 1 || document.getElementById('defaultSearchType').value == 3)) {
				$('#fulltextpopulation').show();
			} else {
				$('#fulltextpopulation').hide();
			}
			
			if (%%GLOBAL_LdapExtension%% != 1) {
				document.getElementById('ldapEnabled').checked = false;
				ToggleLdapSettings(document.getElementById('ldapEnabled'));
				document.getElementById('ldapEnabled').disabled = true;
			}
			
		});

		function ConfirmCancel()
		{
			if (confirm('%%LNG_CancelMessage%%')) {
				document.location.href='index.php?ToDo=editSettings';
			} else {
				return false;
			}
		}

		function ToggleFulltextPopulation (toggleType) {
			if (%%GLOBAL_ManualFullTextPopulation%% && toggleType != 2) {
				$('#fulltextpopulation').show();
			} else {
				$('#fulltextpopulation').hide();
			}
		}
		
		function togglesmtp(toggleType) {
			if (toggleType == 0) {
				$('.SMTPOptions').hide();
			} else {
				$('.SMTPOptions').show();
			}

			document.getElementById('usesmtp'+toggleType).checked = true;
		}

		function toggleinlinehelp(toggleType) {
			if (toggleType) {
				$('.inlineHelpDiv').show();
			} else {
				$('.inlineHelpDiv').hide();
			}
		}

		function CheckForm(f)
		{
			if (FV('knowledgebaseName') == '') {
				alert('%%LNG_NoKnowledgebaseName%%');
				$('#knowledgebaseName').focus();
				return false;
			}

			if (FV('pathToKB') == '') {
				alert('%%LNG_NoKnowledgebasePath%%');
				$('#pathToKB').focus();
				return false;
			}

			if (FV('licenseKey') == '') {
				alert('%%LNG_NoLicenseKey%%');
				$('#licenseKey').focus();
				return false;
			}

			if (FV('pathToKB').indexOf('http') == -1) {
				alert('%%LNG_BadKnowledgebasePath%%');
				$('#pathToKB').focus();
				$('#pathToKB').select();
				return false;
			}
			
			if ($('#frontendToggle:checked').length > 0) {
				if ($('#frontendUser').val() == '') {
					alert('%%LNG_BadFrontendUsername%%');
					$('#frontendUser').focus();
					return false;
				}
				
				if ($('#frontendPass').val() == '') {
					alert('%%LNG_BadFrontendPassword%%');
					$('#frontendPass').focus();
					return false;
				}
			}

			if ($('#enableLoginSecurity:checked').length > 0) {
				var periodVal = $('#bannedPeriod').val();
				var retriedVal = $('#bannedRetried').val();
				if (periodVal == '') {
					alert('%%LNG_BadBannedPeriod%%');
					$('#bannedPeriod').focus();
					return false;
				} else if (!periodVal.toString().match(/^\d*\d*$/)) {
					alert('%%LNG_BadBannedPeriod%%');
					$('#bannedPeriod').focus();
					return false;				
				} else if (periodVal < 5 || periodVal > 60) {
					alert('%%LNG_BadBannedPeriod%%');
					$('#bannedPeriod').focus();
					return false;				
				}

				if (retriedVal == '') {
					alert('%%LNG_BadBannedRetried%%');
					$('#bannedRetried').focus();
					return false;
				} else if (!retriedVal.toString().match(/^\d*\d*$/)) {
					alert('%%LNG_BadBannedRetried%%');
					$('#bannedRetried').focus();
					return false;				
				} else if (retriedVal < 3 || retriedVal > 10) {
					alert('%%LNG_BadBannedRetried%%');
					$('#bannedRetried').focus();
					return false;				
				}
			}

			if (FV('mySQLServer') == '') {
				alert('%%LNG_NoMySQLServer%%');
				$('#mySQLServer').focus();
				return false;
			}

			if (FV('databaseType') == '') {
				alert('%%LNG_NoDatabaseType%%');
				$('#databaseType').focus();
				return false;
			}

			if (FV('mySQLUser') == '') {
				alert('%%LNG_NoMySQLUser%%');
				$('mySQLUser').focus();
				return false;
			}

			if (FV('mySQLDatabase') == '') {
				alert('%%LNG_NoMySQLDatabase%%');
				$('mySQLDatabase').focus();
				return false;
			}

			if (FV('contactEmail') == '') {
				alert('%%LNG_NoContactEmail%%');
				$('contactEmail').focus();
				return false;
			}

			if (FV('contactEmail').indexOf('.') == -1 || FV('contactEmail').indexOf('@') == -1) {
				alert('%%LNG_BadContactEmail%%');
				$('#contactEmail').focus();
				$('#contactEmail').select();
				return false;
			}

			if ((isEmbeddedTemplate()) && (($('#tHeader').value == "") || ($('#tFooter').value == ""))) {
				alert("%%LNG_BlankEmbeddedURL%%");
				return false;
			}

			if (document.getElementById('ldapEnabled')) {
				if (document.getElementById('ldapEnabled').checked) {
					if($('#ldapHost').val() == '') {
						alert("%%LNG_NoLdapHost%%");
						$('#ldapHost').focus();
						return false;
					}
					if($('#ldapPort').val() == '') {
						alert("%%LNG_NoLdapPort%%");
						$('#ldapPort').focus();
						return false;
					}
					if($('#ldapSearchString').val() == '') {
						alert("%%LNG_NoLdapSearchString%%");
						$('#ldapSearchString').focus();
						return false;
					}
					if($('#ldapBaseDn').val() == '') {
						alert("%%LNG_NoLdapBaseDn%%");
						$('#ldapBaseDn').focus();
						return false;
					}
					if($('#ldapConnectUsername').val() == '') {
						alert("%%LNG_NoLdapConnectUsername%%");
						$('#ldapConnectUsername').focus();
						return false;
					}
					if($('#ldapConnectPassword').val() == '') {
						alert("%%LNG_NoLdapConnectPassword%%");
						$('#ldapConnectPassword').focus();
						return false;
					}
					if($('#ldapFirstnameMapto').val() == '') {
						alert("%%LNG_NoLdapFirstnameMapto%%");
						$('#ldapFirstnameMapto').focus();
						return false;
					}
					if($('#ldapLastnameMapto').val() == '') {
						alert("%%LNG_NoLdapLastnameMapto%%");
						$('#ldapLastnameMapto').focus();
						return false;
					}
					if($('#ldapEmailMapto').val() == '') {
						alert("%%LNG_NoLdapEmailMapto%%");
						$('#ldapEmailMapto').focus();
						return false;
					}
					if ($('#ldapEnableGroupMapping')) {
						if (document.getElementById('ldapEnableGroupMapping').checked) {
							if($('#ldapGroupMemberAttb').val() == '') {
								alert("%%LNG_NoLdapGroupMemberAttb%%");
								$('#ldapGroupMemberAttb').focus();
								return false;
							}
							if(document.getElementById('ldapGroupMapping').value == '') {
								alert("%%LNG_NoLdapGroupMapping%%");
								return false;
							}
							$('#ldapGroupMemberAttb').val($('#ldapGroupMemberAttb').val().toLowerCase());
						}
					}
					$('#ldapSearchString').val($('#ldapSearchString').val().toLowerCase());
					$('#ldapBaseDn').val($('#ldapBaseDn').val().toLowerCase());
					$('#ldapConnectUsername').val($('#ldapConnectUsername').val().toLowerCase());
					$('#ldapFirstnameMapto').val($('#ldapFirstnameMapto').val().toLowerCase());
					$('#ldapLastnameMapto').val($('#ldapLastnameMapto').val().toLowerCase());
					$('#ldapEmailMapto').val($('#ldapEmailMapto').val().toLowerCase());
				}
			}

			// Everything is OK, return true
			return true;
		}

		function isEmbeddedTemplate() {
			return (FV('template').substring(0,3) == "EMB");
		}

		function UpdateTemplate()
		{
			if (isEmbeddedTemplate()) {
				document.getElementById('tHeader').disabled = false;
				document.getElementById('tFooter').disabled = false;
				$('#tHeaderRow').show();
				$('#tFooterRow').show();

				var tname = FV('template').substring(4);
				$('#clickpreview').hide();
			} else {
				document.getElementById('tHeader').disabled = true;
				document.getElementById('tFooter').disabled = true;
				$('#tHeaderRow').hide();
				$('#tFooterRow').hide();

				var tname = FV('template');
				$('#clickpreview').show();
			}
			var previewImageSrc = '../templates/' + tname + '/Preview.jpg';
			document.getElementById('templatePreview').src = previewImageSrc;
		}

		function PreviewTemplate()
		{
			var template = '';
			if (isEmbeddedTemplate()) {
				return false;
				var imgPath = '../templates/' + FV('template').substring(4) + '/Preview_large.jpg';
				template = FV('template').substring(4);
			} else {
				var imgPath = '../templates/' + FV('template') + '/Preview_large.jpg';
				template = FV('template');
			}

		    if (top.location.href.indexOf("?") != -1) {
		        var url_part = top.location.href.split('?');
		        var url_to_indexphp = url_part[0];
		    } else {
		        var url_to_indexphp = top.location.href;
		    }
		    var temp = url_to_indexphp + "?ToDo=previewTemplate&template=" + template;
		    
		    var customWidth = 800;
			var customHeight = 540;    
		    tb_show(template + " Template Preview", temp + "&keepThis=true&height="+customHeight+"&width="+customWidth, "");
		}

		function ToggleContactFields(Status)
		{
			if (Status) {
				// Enable the contact fields
				document.getElementById("sendContactEmail").disabled = false;
				document.getElementById("saveSubmittedContact").disabled = false;
				$("#sendContactEmail").attr("checked","checked");
				$("#saveSubmittedContact").attr("checked","checked");
			} else {
				// Disable the contact fields
				document.getElementById("sendContactEmail").disabled = true;
				document.getElementById("saveSubmittedContact").disabled = true;
				$("sendContactEmail").attr("checked","");
				$("saveSubmittedContact").attr("checked","");
			}
		}

		function ToggleFrontAccess(check)
		{
			if (check.checked) {
				$('#frontaccess').show();
			} else {
				FV('frontendUser','');
				FV('frontendPass','');
				$('#frontaccess').hide();
			}
		}

		function ToggleLoginSecurity(check)
		{
			if (check.checked) {
				$('#loginsecurity').show();
			} else {
				FV('bannedPeriod','');
				FV('bannedRetried','');
				$('#loginsecurity').hide();
			}
		}

		function ToggleLdapSettings(check)
		{
			if (!document.getElementById('ldapEnableGroupMapping').checked && check.checked) {
			} else {
				ToggleLdapGroupSettings (check);
			}
			ldapSettingsStatus(check.checked);
		}

		function ToggleLdapGroupSettings(check)
		{
			ldapGroupSettingsStatus(check.checked);
		}

		function ldapGroupSettingsStatus (enableFlg)
		{
			if (enableFlg) {
				document.getElementById('ldapGroupMemberAttb').disabled = false;
				document.getElementById('ldapgroups').disabled = false;
				document.getElementById('ldapClickToRefresh').disabled = false;
				$('#ldapGroupSetting').show();
			} else {
				document.getElementById('ldapGroupMemberAttb').disabled = true;
				document.getElementById('ldapgroups').disabled = true;
				document.getElementById('ldapClickToRefresh').disabled = true;
				$('#ldapGroupSetting').hide();
			}
		}

		function ldapSettingsStatus (enableFlg)
		{
			if (enableFlg) {
				document.getElementById('ldapEnableGroupMapping').disabled = false;
				document.getElementById('ldapUserAccountType').disabled = false;
				document.getElementById('ldapHost').disabled = false;
				document.getElementById('ldapPort').disabled = false;
				document.getElementById('ldapFollowReferral').disabled = false;
				document.getElementById('ldapVersionThree').disabled = false;
				document.getElementById('ldapNegoTLS').disabled = false;
				document.getElementById('ldapSearchString').disabled = false;
				document.getElementById('ldapBaseDn').disabled = false;
				document.getElementById('ldapConnectUsername').disabled = false;
				document.getElementById('ldapConnectPassword').disabled = false;
				document.getElementById('ldapFirstnameMapto').disabled = false;
				document.getElementById('ldapLastnameMapto').disabled = false;
				document.getElementById('ldapEmailMapto').disabled = false;
				document.getElementById('ldapAllowUserUpdateDetails').disabled = false;
				document.getElementById('ldapRemoveUser').disabled = false;
				document.getElementById('ldapDefaultAction').disabled = false;
				$('#ldapSetting').show();
				$('#ldapSyncSetting').show();
				$('#ldapGroupEnableSetting').show();
				if (document.getElementById('ldapEnableGroupMapping').checked) {
					$('#ldapGroupSetting').show();
				}
				$('#ldapGroupDefaultAction').show();
			} else {
				document.getElementById('ldapEnableGroupMapping').disabled = true;
				document.getElementById('ldapUserAccountType').disabled = true;
				document.getElementById('ldapHost').disabled = true;
				document.getElementById('ldapPort').disabled = true;
				document.getElementById('ldapFollowReferral').disabled = true;
				document.getElementById('ldapVersionThree').disabled = true;
				document.getElementById('ldapNegoTLS').disabled = true;
				document.getElementById('ldapSearchString').disabled = true;
				document.getElementById('ldapBaseDn').disabled = true;
				document.getElementById('ldapConnectUsername').disabled = true;
				document.getElementById('ldapConnectPassword').disabled = true;
				document.getElementById('ldapFirstnameMapto').disabled = true;
				document.getElementById('ldapLastnameMapto').disabled = true;
				document.getElementById('ldapEmailMapto').disabled = true;
				document.getElementById('ldapAllowUserUpdateDetails').disabled = true;
				document.getElementById('ldapRemoveUser').disabled = true;
				document.getElementById('ldapDefaultAction').disabled = true;
				$('#ldapSetting').hide();
				$('#ldapSyncSetting').hide();
				$('#ldapGroupSetting').hide();
				$('#ldapGroupDefaultAction').hide();
				$('#ldapGroupEnableSetting').hide();

			}
		}

		function ShowTab(T)
		{
			i = 0;
			max = 6;
			while (i <= max) {
				if (document.getElementById("tab" + i) != null) {
					document.getElementById("div" + i).style.display = "none";
					document.getElementById("tab" + i).className = "";
				}
				i++;
			}
			
			document.getElementById("div" + T).style.display = "";
			document.getElementById("tab" + T).className = "active";
		}

		var req;
		var reqRefreshAttachmentStatus;
		var url = '%%GLOBAL_pathToKB%%/admin/remote.php';
		function DoCallback(data)
		{
			if (!req) {
				// branch for native XMLHttpRequest object
				if (window.XMLHttpRequest) {
					req = new XMLHttpRequest();
				// branch for IE/Windows ActiveX version
				} else if (window.ActiveXObject) {
					req = new ActiveXObject('Microsoft.XMLHTTP')
				}
			}
			req.onreadystatechange = processReqChange;
			req.open('POST', url, true);
			req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			req.send(data);
		}

		function RefreshAttachmentStatusDoCallback(data)
		{
			if (!reqRefreshAttachmentStatus) {
				// branch for native XMLHttpRequest object
				if (window.XMLHttpRequest) {
					reqRefreshAttachmentStatus = new XMLHttpRequest();
				// branch for IE/Windows ActiveX version
				} else if (window.ActiveXObject) {
					reqRefreshAttachmentStatus = new ActiveXObject('Microsoft.XMLHTTP')
				}
			}
			reqRefreshAttachmentStatus.onreadystatechange = RefreshAttachmentStatusProcessReqChange;
			reqRefreshAttachmentStatus.open('POST', url, true);
			reqRefreshAttachmentStatus.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			reqRefreshAttachmentStatus.send(data);
		}

		function RefreshAttachmentStatusProcessReqChange() {

			// only if req shows 'loaded'
			if (reqRefreshAttachmentStatus.readyState == 4) {
				// only if 'OK'
				if (reqRefreshAttachmentStatus.status != 200) {
					alert('There was a problem retrieving the XML data:\n' +
						reqRefreshAttachmentStatus.responseText);
				} else {
					RefreshAttachmentStatusProcessData(reqRefreshAttachmentStatus.responseXML);
				}
			}
		}
		function processReqChange() {

			// only if req shows 'loaded'
			if (req.readyState == 4) {
				// only if 'OK'
				if (req.status != 200) {
					alert('There was a problem retrieving the XML data:\n' +
						req.responseText);
				} else {
					ProcessData(req.responseXML);
				}
			}
		}
		
		function RefreshAttachmentStatusProcessData(data)
		{
			var root = data.documentElement;
			var items = root.childNodes;
			var status = 0;
			for (i = 0; i < items.length; i++) {
				var text = '';
				var value = '';
				for (j = 0; j < items[i].attributes.length; j++) {
					switch (items[i].attributes[j].nodeName) {
						case 'id':
							elementId = items[i].attributes[j].value;
							break;
						case 'text':
							status = items[i].attributes[j].value;
							break;
					}
				}
			}
			element = document.getElementById(elementId + '_Refresh');
			if (status != 1) {
				element.checked=false;
				description = 'EnableIndexPdf_PluginFailed';
				description = description.replace('_','');
				description =  '%%LNG_' + description + '%%';
				switch (elementId) {
					case 'Pdf_Plugin':
						alert ('%%LNG_EnableIndexExtensionFailed%%\n\n%%LNG_EnableIndexPdfPluginFailed%%');
					break;
					case 'External_Doc_Plugin':
						alert ('%%LNG_EnableIndexExtensionFailed%%\n\n%%LNG_EnableIndexExternalDocPluginFailed%%');
					break;
					case 'Docx_Plugin':
						alert ('%%LNG_EnableIndexExtensionFailed%%\n\n%%LNG_EnableIndexDocxPluginFailed%%');
					break;
					case 'External_Ppt_Plugin':
						alert ('%%LNG_EnableIndexExtensionFailed%%\n\n%%LNG_EnableIndexExternalPptPluginFailed%%');
					break;
					case 'Image_Plugin':
						alert ('%%LNG_EnableIndexExtensionFailed%%\n\n%%LNG_EnableIndexImagePluginFailed%%');
					break;
					default:
						alert ('%%LNG_EnableIndexExtensionFailed%%\n\n');
					break;
				}
			} else {
				var tempDirMessage = '%%GLOBAL_Word2003Message%%';
				if (elementId == 'External_Doc_Plugin' && tempDirMessage != '') {
					alert (tempDirMessage);
					element.checked=false;
				}
				
			}
			reqRefreshAttachmentStatus=null;

		}

		function ProcessData(data)
		{
			var rel = document.getElementById("ldapgroups")
			var root = data.documentElement;
			var items = root.childNodes;
			var added=0;

			rel.options[0] = null;
			rel.options.length = 0;

			for (i = 0; i < items.length; i++) {
				var text = '';
				var value = '';
				for (j = 0; j < items[i].attributes.length; j++) {
					switch (items[i].attributes[j].nodeName) {
						case 'text':
							text = items[i].attributes[j].value;
							break;
						case 'id':
							value = items[i].attributes[j].value;
							break;
					}
				}

				if (value == '') {
					alert (text);
					text = ' -- %%LNG_RefreshGroupList%% -- ';
				}
				rel.options[added] = new Option(text, value);
				added++;
			}
			rel.options.length = added;
			req=null;
		}

		function refreshAttachmentIndexStatus(selObj) {
			RefreshAttachmentStatusDoCallback("type=refreshattachmentstatus&docType=" + selObj.id);
		}
		
		function GetLdapGroup(selObj)
		{
			clearDbGroupsSelection();
			// Clear the ldap groups list
			rel = document.getElementById("ldapgroups");
			rel.options.length = 0;

			ldapUserAccountType = $("#ldapUserAccountType").val();
			host = $("#ldapHost").val();
			port = $("#ldapPort").val();
			username = $("#ldapConnectUsername").val();
			password = $("#ldapConnectPassword").val();
			baseDn = $("#ldapBaseDn").val();
			ldapVersionThree = $("#ldapVersionThree").val();
			ldapNegTLS = 0;
			if (document.getElementById("ldapNegoTLS").checked) {
				ldapNegTLS = 1;
			}
			ldapFollowReferral = $("#ldapFollowReferral").val();
			rel.options[0] = new Option("%%LNG_Loading%%", "-1");
			rel.options.length = 1;
			window.status = "%%LNG_LdapGroupWaitMessage%%";
			DoCallback("type=ldapgrouplist&host="+host+"&ldapUserAccountType="+ldapUserAccountType+"&port="+port+"&username="+username+"&password="+password+"&baseDn="+baseDn+"&ldapFollowReferral="+ldapFollowReferral+"&ldapVersionThree="+ldapVersionThree+"&ldapNegTLS="+ldapNegTLS);
			window.status = "";
		}

		function addLdapGroupMapping (newMapping) {
			var existingMapping = document.getElementById("ldapGroupMapping").value;
			if (existingMapping != '') {
				document.getElementById("ldapGroupMapping").value = existingMapping + ';' + newMapping;
			} else {
				document.getElementById("ldapGroupMapping").value = newMapping;
			}
		}

		function mapGroup()
		{
			var ldapGroup = $("#ldapgroups").val();
			var databaseGroup = document.getElementById("dbgroup_old");
			var databaseGroupArray = new Array();
			var databaseGroupString = "";
			var mappedEntity = '';
			
			if (!ldapGroup) {
				alert ('%%LNG_NoLdapGroupSelected%%');
			$("input:checked[name='ISSelectReplacement_dbgroup[][]']").each(function() {
				this.checked = false;
			});
				return false;
			}
			
			$("input:checked[name='ISSelectReplacement_dbgroup[][]']").each(function() {
				databaseGroupArray.push(this.value);
			});

			
			databaseGroupString = databaseGroupArray.join(',');
			mappedEntity = ldapGroup + ':_:' + databaseGroupString;
			if (existLdapGroupMapping(ldapGroup) != '') {
				removeLdapGroupMapping(ldapGroup);
			}
			if (databaseGroupString != '')
				addLdapGroupMapping(mappedEntity);
			// alert (document.getElementById("ldapGroupMapping").value);
		}

		function clearDbGroupsSelection()
		{
			var tobeadded = document.getElementById("outerdbgroup");
			var preadded = '<select id="dbgroup" class="Field400 ISSelectReplacement" style="height: 140px;" name="dbgroup[]" multiple="multiple"  size="5" >';
			var allDatabaseGroupSelectBox = document.getElementById("dbgroup_old");
			for (i=0; i < allDatabaseGroupSelectBox.length; i++) {
				preadded = preadded + '<option onclick="mapGroup();" value="'+allDatabaseGroupSelectBox.options[i].value+'" >' + allDatabaseGroupSelectBox.options[i].text + '</option>' ;
			}
			preadded += '</select>';
			tobeadded.innerHTML = preadded;
			ISSelectReplacement.replace_select(document.getElementById("dbgroup"));
		}

		function addDbGroup (ldapGroup, dbGroup, addFlg)
		{
			var allDbGroups = document.getElementById("dbgroup_old");
			for (i=0; i < allDbGroups.length; i++) {
				alert (allDbGroups.options[i].text + '=' + allDbGroups.options[i].selected);
			}
		}

		function preSelectLocalGroups (ldapGroup)
		{
			clearDbGroupsSelection();
			var tobeadded = document.getElementById("outerdbgroup");
			var preadded = '<select id="dbgroup" class="Field400 ISSelectReplacement" style="height: 140px;" name="dbgroup[]" multiple="multiple"  size="5" >';
			var preaddedHelper = '';
			var selectedDbGroups = existLdapGroupMapping(ldapGroup.value);
			var allDatabaseGroup = document.getElementById("dbgroup_old");
			var databaseGroupArray = selectedDbGroups.split(',');
			for (i=0; i < allDatabaseGroup.length; i++) {
				preaddedHelper = '<option onclick="mapGroup()"; value="'+allDatabaseGroup.options[i].value+'" >' + allDatabaseGroup.options[i].text + '</option>';
				for (j=0; j < databaseGroupArray.length; j++) {
					if (allDatabaseGroup.options[i].value == databaseGroupArray[j]) {
						allDatabaseGroup.options[i].selected = true;
						preaddedHelper = '<option selected onclick="mapGroup()"; value="'+allDatabaseGroup.options[i].value+'" >' + allDatabaseGroup.options[i].text + '</option>';
					}
				}
				preadded += preaddedHelper;
			}
			preadded += '</select>';
			tobeadded.innerHTML = preadded;

			ISSelectReplacement.replace_select(document.getElementById("dbgroup"));
		}

		function existLdapGroupMapping (ldapGroup) {
			var existingMapping = document.getElementById('ldapGroupMapping').value;
			var groupMappings = existingMapping.split(';');
			var groupAssignments = new Array();
			var existingMappingString = '';
			for (i=0; i<groupMappings.length; i++) {
				groupAssignments = groupMappings[i].split(':_:');
				if (groupAssignments[0] == ldapGroup) {
					existingMappingString = groupAssignments[1];
					return existingMappingString;
				}
			}
			return existingMappingString;
		}

		function removeLdapGroupMapping(ldapGroup) {
			var existingMapping = document.getElementById('ldapGroupMapping').value;
			var groupMappings = existingMapping.split(';');
			var groupAssignments = new Array();
			var results = new Array();
			var j=0;
			for (i=0; i<groupMappings.length; i++) {
				groupAssignments = groupMappings[i].split(':_:');
				if (groupAssignments[0] != ldapGroup) {
					results[j] = groupMappings[i];
					j++;
				}
			}
			document.getElementById('ldapGroupMapping').value = results.join(';');
		}

	</script>

	<form action="index.php?ToDo=saveSettings" onSubmit="return CheckForm(this)" name="frmEditSettings" id="frmEditSettings" method="post">

	<input type="hidden" name="templateHeader" value="%%GLOBAL_templateHeader%%" />
	<input type="hidden" name="templateFooter" value="%%GLOBAL_templateFooter%%" />
	<input type="hidden" name="currentLanguage" id="databaseType" value="%%GLOBAL_currentLanguage%%">
	<input type="hidden" name="installVersion" id="installVersion" value="5.1.1">

	<table class="OuterPanel" id="outerpanel" cellspacing="0" cellpadding="0" border="0">
	<tr>
		<td class="Heading1">%%LNG_ManageSettings%%</td>
	</tr>
	<tr>
		<td class="Intro">
			<div>%%LNG_ManageSettingsIntro%%</div>
		</td>
	</tr>
	<tr>
		<td>
		%%GLOBAL_Message%%
		</td>
	</tr>
	<tr>
		<td>
			<div class="OuterPanel">
				<input type="submit" name="SubmitButton1" value="%%LNG_Save%%" class="FormButton">
				<input type="button" name="CancelButton1" value="%%LNG_Cancel%%" class="FormButton" onClick="ConfirmCancel()">
			</div>
			<br />
			<ul id="tabnav">
				<li><a href="#" class="active" id="tab0" onClick="ShowTab(0)">%%LNG_ApplicationSettings%%</a></li>
				<li><a href="#" id="tab1" onClick="ShowTab(1)">%%LNG_TemplateSettings%%</a></li>
				<li><a href="#" id="tab2" onClick="ShowTab(2)">%%LNG_FeatureSettings%%</a></li>%%GLOBAL_s%%
				<li><a href="#" id="tab5" onClick="ShowTab(5)">%%LNG_SecuritySettings%%</a></li>
				<li><a href="#" id="tab3" onClick="ShowTab(3)">%%LNG_MiscellaneousSettings%%</a></li>
			</ul>
		</td>
	</tr>
	<tr>
		<td height="10"></td>
	</tr>
	<tr>
		<td>
			<div id="div0">
			<table class="Panel">
			<tr>
				<td class="Heading2" colspan=2>%%LNG_SiteStatusSettings%%</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_DownForMaintenance%%
				</td>
				<td>
					<input type="checkbox" id="downForMaintenance" name="downForMaintenance" value="on" %%GLOBAL_YesDown%%> 
					<label for="downForMaintenance">%%LNG_YesDownForMaintenance%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_DownForMaintenance%%', '%%LNG_DownForMaintenanceHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="Gap">&nbsp;</td>
			</tr>
			<tr>
				<td class="Heading2" colspan=2>%%LNG_SiteSettings%%</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					<span class="Required">*</span>&nbsp;%%LNG_KnowledgebaseName%%:
				</td>
				<td>
					<input type="text" name="knowledgebaseName" id="knowledgebaseName" value="%%GLOBAL_knowledgebaseName%%" class="Field300">
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_KnowledgebaseName%%', '%%LNG_KnowledgebaseNameHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					<span class="Required">*</span>&nbsp;%%LNG_KnowledgebaseURL%%:
				</td>
				<td>
					<input type="text" name="pathToKB" id="pathToKB" value="%%GLOBAL_pathToKB%%" class="Field300">
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_KnowledgebaseURL%%', '%%LNG_KnowledgebaseURLHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					<span class="Required">*</span>&nbsp;%%LNG_LicenseKey%%:
				</td>
				<td>
					<input type="text" name="licenseKey" id="licenseKey" value="%%GLOBAL_licenseKey%%" class="Field300">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					<span class="Required">*</span>&nbsp;%%LNG_CharacterSet%%:
				</td>
				<td>
					<select name="charset" id="charset" class="Field300">
						%%GLOBAL_CharSetOptions%%
					</select>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_CharacterSet%%', '%%LNG_CharacterSetHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;
				</td>
				<td>
					<img src="images/nodejoin.gif" height="20" width="20" alt="stalk">
					<input type="checkbox" id="rightToLeft" name="rightToLeft" %%GLOBAL_YesRightToLeft%%> <label for="rightToLeft">%%LNG_YesRightToLeft%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_EnableRightToLeft%%', '%%LNG_EnableRightToLeftHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="Gap">&nbsp;</td>
			</tr>
			</table>

			<table class="Panel" style="margin-top:0px;">
				<tr>
					<td class="Heading2" colspan="2">%%LNG_MailServerDetails%%</td>
				</tr>
				<tr>
					<td class="FieldLabel">
						&nbsp;&nbsp;
						%%LNG_OutgoingMailServer%%:
					</td>
					<td>
						<label for="usesmtp0">
							<input name="smtpDefault" id="usesmtp0" value="true" type="radio" %%GLOBAL_usesmtp_false%% onclick="togglesmtp(0);">
							%%LNG_UseCurrentSMTPServer%% (%%GLOBAL_PHPSMTP%%)
						</label>
						<br />
						<label for="usesmtp1">
							<input name="smtpDefault" id="usesmtp1" value="false" type="radio" %%GLOBAL_usesmtp_true%% onclick="togglesmtp(1);">
							%%LNG_ManuallySpecifySMTPServer%%
						</label>

						<img onmouseout="HideHelp(this);" onmouseover="ShowHelp(this, '%%LNG_ManuallySpecifySMTPServer%%', '%%LNG_ManuallySpecifySMTPServerHelp%%');" src="images/help.gif" border="0" height="16" width="24" />
					</td>
				</tr>
				<tr class="SMTPOptions" style="display: table-row;">
					<td class="FieldLabel">
						&nbsp;&nbsp;
						%%LNG_SMTPHostname%%:
					</td>
					<td>
						<input name="smtpServer" class="Field200" id="smtp_server" value="%%GLOBAL_smtpServer%%" class="Field250 smtpSettings" type="text"> <img onmouseout="HideHelp(this);" onmouseover="ShowHelp(this, '%%LNG_SMTPHostname%%', '%%LNG_SMTPHostnameHelp%%');" src="images/help.gif" border="0" height="16" width="24" />
					</td>
				</tr>
				<tr class="SMTPOptions" style="display: table-row;">
					<td class="FieldLabel">
						&nbsp;&nbsp;
						%%LNG_SMTPUsername%%:
					</td>
					<td>
						<input name="smtpUsername" class="Field200" id="smtp_u" value="%%GLOBAL_smtpUsername%%" class="Field250 smtpSettings" type="text"> <img onmouseout="HideHelp(this);" onmouseover="ShowHelp(this, '%%LNG_SMTPUsername%%', '%%LNG_SMTPUsernameHelp%%');" src="images/help.gif" border="0" height="16" width="24" />
					</td>
				</tr>
				<tr class="SMTPOptions" style="display: table-row;">
					<td class="FieldLabel">
						&nbsp;&nbsp;
						%%LNG_SMTPPassword%%:
					</td>
					<td>
						<input name="smtpPassword" class="Field200" id="smtp_p" value="%%GLOBAL_smtpPassword%%" class="Field250 smtpSettings" type="password"> <img onmouseout="HideHelp(this);" onmouseover="ShowHelp(this, '%%LNG_SMTPPassword%%', '%%LNG_SMTPPasswordHelp%%');" src="images/help.gif" border="0" height="16" width="24" />
					</td>
				</tr>
				<tr class="SMTPOptions" style="display: table-row;">
					<td class="FieldLabel">
						&nbsp;&nbsp;
						%%LNG_SMTPPort%%:
					</td>
					<td>
						<input name="smtpPort" class="Field200" id="smtp_port" value="%%GLOBAL_smtpPort%%" class="Field250 smtpSettings" type="text"> <img onmouseout="HideHelp(this);" onmouseover="ShowHelp(this, '%%LNG_SMTPPort%%', '%%LNG_SMTPPortHelp%%');" src="images/help.gif" border="0" height="16" width="24" />
					</td>
				</tr>
				<tr class="SMTPOptions" style="display: table-row;">
					<td class="FieldLabel">
						&nbsp;
					</td>
				</tr>
			</table>

			<table class="Panel"  style="margin-top:0px;">
			<tr>
				<td class="Heading2" colspan=2>%%LNG_DatabaseSettings%%</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					<span class="Required">*</span>&nbsp;%%LNG_DatabaseType%%:
				</td>
				<td>
					<label for="databaseType">%%GLOBAL_DatabaseTypeDisplay%%</label>
					<input type="hidden" name="databaseType" id="databaseType" value="%%GLOBAL_databaseType%%">
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_DatabaseType%%', '%%LNG_DatabaseTypeHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					<span class="Required">*</span>&nbsp;%%LNG_MySQLServer%%:
				</td>
				<td>
					<input type="text" name="mySQLServer" id="mySQLServer" value="%%GLOBAL_mySQLServer%%" class="Field300" readonly>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_MySQLServer%%', '%%LNG_MySQLServerHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					<span class="Required">*</span>&nbsp;%%LNG_MySQLUsername%%:
				</td>
				<td>
					<input type="text" name="mySQLUser" id="mySQLUser" value="%%GLOBAL_mySQLUser%%" class="Field300" readonly>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_MySQLUsername%%', '%%LNG_MySQLUsernameHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_MySQLPass%%:
				</td>
				<td>
					<input type="password" name="mySQLPass" value="%%GLOBAL_mySQLPass%%" class="Field300" readonly>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_MySQLPass%%', '%%LNG_MySQLPassHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					<span class="Required">*</span>&nbsp;%%LNG_MySQLDatabase%%:
				</td>
				<td>
					<input type="text" name="mySQLDatabase" id="mySQLDatabase" value="%%GLOBAL_mySQLDatabase%%" class="Field300" readonly>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_MySQLDatabase%%', '%%LNG_MySQLDatabaseHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_TablePrefix%%:
				</td>
				<td>
					<input type="text" name="tablePrefix" value="%%GLOBAL_tablePrefix%%" class="Field300" readonly>
					
					<div style="display:none" id="d9"></div>
				</td>
			</tr>
			<tr>
				<td colspan="2" class="Gap">&nbsp;</td>
			</tr>
			</table>
			</div>

			<div id="div1" style="display: none">
			<table class="Panel">
			<tr>
				<td class="Heading2" colspan="2">
					%%LNG_TemplateSettings%%:
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					<span class="Required">*</span>&nbsp;%%LNG_Template%%:
				</td>
				<td>
					<select onchange="UpdateTemplate()" name="template" id="template" class="Field200">
						%%GLOBAL_TemplateOptions%%
					</select>
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;
				</td>
				<td>
					<img width="200" onclick="PreviewTemplate();" src="../templates/%%GLOBAL_template%%/Preview.jpg" id="templatePreview" alt="preview" style="border: 1px solid #AAA; padding: 1px;cursor: pointer;" /><br />
					<br /><a id="clickpreview" href="javascript:PreviewTemplate()"><img border="0" hspace="3" src="images/magnify.gif" width="10" height="11" alt="enlarge">%%LNG_ClickToEnlarge%%</a>
				</td>
			</tr>
			<tr id="tHeaderRow">
				<td class="FieldLabel">
					<span class="Required">*</span>&nbsp;%%LNG_TemplateHeader%%:
				</td>
				<td>
					<input type="text" name="templateHeader" id="tHeader" class="Field200" value="%%GLOBAL_templateHeader%%" disabled="disabled" />
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_TemplateHeader%%', '%%LNG_TemplateEmbeddedHeaderHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr id="tFooterRow">
				<td class="FieldLabel">
					<span class="Required">*</span>&nbsp;%%LNG_TemplateFooter%%:
				</td>
				<td>
					<input type="text" name="templateFooter" id="tFooter" class="Field200" value="%%GLOBAL_templateFooter%%" disabled="disabled" />
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_TemplateFooter%%', '%%LNG_TemplateEmbeddedFooterHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td colspan="2" class="Gap">&nbsp;</td>
			</tr>

			</table>

			</div>



			<div id="div2" style="display: none">
			<table class="Panel">
			<tr>
				<td class="Heading2" colspan=2>%%LNG_AttachmentSearchSettings%%</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_EnableAttachmentSearch%%?
				</td>
				<td>
					<input type="checkbox" name="enableAttachmentSearch" id="enableAttachmentSearch0" value="on" %%GLOBAL_enableAttachmentSearch%% onclick="if (!this.checked) {document.getElementById('indexPlugins').style.display = 'none';} else {document.getElementById('indexPlugins').style.display = '';}" %%GLOBAL_EnableAttachmentSearchChecked%%> 
					<label for="enableAttachmentSearch0">%%LNG_YesEnableAttachmentSearch%% </label> 
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_EnableAttachmentSearch%%', '%%LNG_EnableAttachmentSearchHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help"> 
					<label for="learnMore" title="%%LNG_LearnMore%%"><a href="javascript:LaunchHelp('849');">%%LNG_LearnMore%%</a></label>
				</td>
			</tr>
			<tr id="indexPlugins">
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;
				</td>
				<td>
					<div>
						<div>
							<img src="images/nodejoin.gif" height="20" width="20" alt="stalk">
							<input type="checkbox" id="Default_Plugin_Refresh" name="Default_Plugin" value="on" %%GLOBAL_YesEnableDefaultIndex%% onclick="if(this.checked) {refreshAttachmentIndexStatus(this);}" disabled checked> 
							<label for="Default_Plugin_Refresh"> %%LNG_YesEnableDefaultIndex%%</label>
						</div>
						<div>
							<img src="images/nodejoin.gif" height="20" width="20" alt="stalk">
							<input type="checkbox" id="External_Doc_Plugin_Refresh" name="External_Doc_Plugin" value="on" %%GLOBAL_YesEnableDocIndex%%  onclick="if(this.checked) {refreshAttachmentIndexStatus(this);}" %%GLOBAL_External_Doc_Plugin%%> 
							<label for="External_Doc_Plugin_Refresh"> %%LNG_YesEnableDocIndex%%</label>
						</div>
						<div>
							<img src="images/nodejoin.gif" height="20" width="20" alt="stalk">
							<input type="checkbox" id="Docx_Plugin_Refresh" name="Docx_Plugin" value="on" %%GLOBAL_YesEnableDocxIndex%% onclick="if(this.checked) {refreshAttachmentIndexStatus(this);}" %%GLOBAL_Docx_Plugin%%> 
							<label for="Docx_Plugin_Refresh"> %%LNG_YesEnableDocxIndex%%</label>
						</div>
						<div>
							<img src="images/nodejoin.gif" height="20" width="20" alt="stalk">
							<input type="checkbox" id="External_Ppt_Plugin_Refresh" name="External_Ppt_Plugin" value="on" %%GLOBAL_YesEnablePptIndex%% onclick="if(this.checked) {refreshAttachmentIndexStatus(this);}" %%GLOBAL_External_Ppt_Plugin%%> 
							<label for="External_Ppt_Plugin_Refresh"> %%LNG_YesEnablePptIndex%%</label>
						</div>
						<div>
							<img src="images/nodejoin.gif" height="20" width="20" alt="stalk">
							<input type="checkbox" id="Pdf_Plugin_Refresh" name="Pdf_Plugin" value="on" %%GLOBAL_YesEnablePdfIndex%% onclick="if(this.checked) {refreshAttachmentIndexStatus(this);}" %%GLOBAL_Pdf_Plugin%%> 
							<label for="Pdf_Plugin_Refresh"> %%LNG_YesEnablePdfIndex%%</label>
						</div>
						<div>
							<img src="images/nodejoin.gif" height="20" width="20" alt="stalk">
							<input type="checkbox" id="Image_Plugin_Refresh" name="Image_Plugin" value="on" %%GLOBAL_YesEnableImageIndex%% onclick="if(this.checked) {refreshAttachmentIndexStatus(this);}" %%GLOBAL_Image_Plugin%%> 
							<label for="Image_Plugin_Refresh"> %%LNG_YesEnableImageIndex%%</label>
						</div>
						<div>
							<div class="HelpInfo" style="width:430px;margin-bottom:0px;">
								<img align="left" src="images/info.gif"/>
								%%LNG_FileIndexInfo%%
							</div>
						</div>
					</div>
				</td>
			</tr>
			<tr>
				<td class="Gap" colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td class="Heading2" colspan=2>%%LNG_HomePageSettings%%</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_PopularQuestionsNumber%%:
				</td>
				<td>
					<input type="text" size="2" id="popularQuestionNumber" name="popularQuestionNumber" value="%%GLOBAL_popularQuestionNumber%%" class="Field" />
					<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_PopularQuestionsNumber%%', '%%LNG_PopularQuestionsNumberHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_FeaturedQuestionsNumber%%:
				</td>
				<td>
					<input type="text" size="2" id="featuredQuestionNumber" name="featuredQuestionNumber" value="%%GLOBAL_featuredQuestionNumber%%" class="Field" />
					<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_FeaturedQuestionsNumber%%', '%%LNG_FeaturedQuestionsNumberHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_NewsQuestionsNumber%%:
				</td>
				<td>
					<input type="text" size="2" id="newsQuestionNumber" name="newsQuestionNumber" value="%%GLOBAL_newsQuestionNumber%%" class="Field" />
					<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_NewsQuestionsNumber%%', '%%LNG_NewsQuestionsNumberHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_RecentQuestionsNumber%%:
				</td>
				<td>
					<input type="text" size="2" id="recentQuestionNumber" name="recentQuestionNumber" value="%%GLOBAL_recentQuestionNumber%%" class="Field" />
					<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_RecentQuestionsNumber%%', '%%LNG_RecentQuestionsNumberHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="Gap" colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td class="Heading2" colspan=2>%%LNG_CommentsSettings%%</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_EnableQuestionComments%%:
				</td>
				<td>
					<input type="checkbox" id="allowVisitorComments" name="allowVisitorComments" %%GLOBAL_YesEnableComments%%> <label for="allowVisitorComments">%%LNG_YesEnableQuestionComments%%</label>
					<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_EnableQuestionComments%%', '%%LNG_EnableQuestionCommentsHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_AutoApproveComments%%:
				</td>
				<td>
					<input type="checkbox" id="autoApproveComments" name="autoApproveComments" %%GLOBAL_YesAutoApproveComments%%> <label for="autoApproveComments">%%LNG_YesAutoApproveComments%%</label>
					<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_AutoApproveComments%%', '%%LNG_AutoApproveCommentsHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="Gap" colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td class="Heading2" colspan=2>%%LNG_ArticlesSettings%%</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_EnableEmailQuestion%%:
				</td>
				<td>
					<input type="checkbox" id="allowEmailQuestion" name="allowEmailQuestion" %%GLOBAL_YesEnableEmailQuestion%%><label for="allowEmailQuestion">%%LNG_YesEnableEmailQuestions%%</label>
					<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_EnableEmailQuestion%%', '%%LNG_EnableEmailQuestionHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_EnablePrintQuestion%%:
				</td>
				<td>
					<input type="checkbox" id="allowPrintQuestion" name="allowPrintQuestion" %%GLOBAL_YesEnablePrintQuestion%%> <label for="allowPrintQuestion">%%LNG_YesEnablePrintQuestions%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_EnablePrintQuestion%%', '%%LNG_EnablePrintQuestionHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_EnableQuestionRatings%%:
				</td>
				<td>
					<input type="checkbox" id="allowQuestionRatings" name="allowQuestionRatings" %%GLOBAL_YesEnableQuestionRatings%%> <label for="allowQuestionRatings">%%LNG_YesEnableQuestionRatings%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_EnableQuestionRatings%%', '%%LNG_EnableQuestionRatingsHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_enablePDFExport%%:
				</td>
				<td>
					<input type="checkbox" id="enablePDFExport" name="enablePDFExport" %%GLOBAL_YesEnablePDFExport%%> <label for="enablePDFExport">%%LNG_YesEnablePDFExport%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_enablePDFExport%%', '%%LNG_enablePDFExportHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="Gap" colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td class="Heading2" colspan=2>%%LNG_ContactPageSettings%%</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_EnableContactPage%%:
				</td>
				<td>
					<input type="checkbox" name="enableContactPage" id="enableContactPage" %%GLOBAL_YesEnableContactPage%% onClick="ToggleContactFields(this.checked)"> <label for="enableContactPage">%%LNG_YesEnableContactPage%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_EnableContactPage%%', '%%LNG_EnableContactPageHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_SendContactEmail%%
				</td>
				<td>
					<img src="images/nodejoin.gif" alt=""><input type="checkbox" name="sendContactEmail" id="sendContactEmail" %%GLOBAL_YesSendContactEmail%% %%GLOBAL_DisableSendEmail%%> <label for="sendContactEmail">%%LNG_YesSendContactEmail%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_SendContactEmail%%', '%%LNG_SendContactEmailHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_SaveSubmittedQuestion%%
				</td>
				<td>
					<img src="images/nodejoin.gif" alt=""><input type="checkbox" name="saveSubmittedContact" id="saveSubmittedContact" %%GLOBAL_YesSaveSubmittedContact%% %%GLOBAL_DisableSaveSubmittedContact%%> <label for="saveSubmittedContact">%%LNG_YesSaveSubmittedContact%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_SaveSubmittedQuestion%%', '%%LNG_SaveSubmittedQuestionHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="Gap" colspan="2">&nbsp;</td>
			</tr>
			</table>

			</div>
			<div id="div4" style="display: none">
			
			%%GLOBAL_LdapMessage%%
			
			<input type="hidden" name="ldapUserAccountType" value="%%GLOBAL_ldapUserAccountType%%" />
			<input type="hidden" name="ldapHost" value="%%GLOBAL_ldapHost%%" />
			<input type="hidden" name="ldapPort" value="%%GLOBAL_ldapPort%%" />
			<input type="hidden" name="ldapFollowReferral" value="%%GLOBAL_ldapFollowReferral%%" />
			<input type="hidden" name="ldapVersionThree" value="%%GLOBAL_ldapVersionThree%%" />
			<input type="hidden" name="ldapSearchString" value="%%GLOBAL_ldapSearchString%%" />
			<input type="hidden" name="ldapBaseDn" value="%%GLOBAL_ldapBaseDn%%" />
			<input type="hidden" name="ldapConnectUsername" value="%%GLOBAL_ldapConnectUsername%%" />
			<input type="hidden" name="ldapConnectPassword" value="%%GLOBAL_ldapConnectPassword%%" />
			<input type="hidden" name="ldapFirstnameMapto" value="%%GLOBAL_ldapFirstnameMapto%%" />
			<input type="hidden" name="ldapLastnameMapto" value="%%GLOBAL_ldapLastnameMapto%%" />
			<input type="hidden" name="ldapEmailMapto" value="%%GLOBAL_ldapEmailMapto%%" />
			<input type="hidden" name="ldapRemoveUser" value="%%GLOBAL_ldapRemoveUser%%" />
			<input type="hidden" name="ldapGroupMemberAttb" value="%%GLOBAL_ldapGroupMemberAttb%%" />
			<input type="hidden" name="ldapDefaultAction" value="%%GLOBAL_ldapDefaultAction%%" />
			<input type="hidden" name="ldapGroupMapping" id="ldapGroupMapping" value="%%GLOBAL_ldapGroupMapping%%" />
			<input type="hidden" name="ldapGroupMember" value="%%GLOBAL_ldapGroupMember%%" />


			<table class="Panel">
			<tr>
				<td class="Heading2" colspan="2">%%LNG_LdapIntegrationSettings%%</td>
			</tr>
			<tr>
				<td colspan="2" >
						<table class="Panel">
							<tr>
								<td class="FieldLabel">
									&nbsp;&nbsp;&nbsp;%%LNG_LdapEnabled%%
								</td>
								<td>
									<input type="checkbox" name="ldapEnabled" id="ldapEnabled" onclick="ToggleLdapSettings(this);" %%GLOBAL_YesLdapEnabled%%>
									<label for="ldapEnabled">%%LNG_YesLdapEnabled%%</label>
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapEnabled%%', '%%LNG_LdapEnabledHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
						</table>
						<table class="Panel" id="ldapSetting">
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapUserAccountType%%:
								</td>
								<td>
									<select id="ldapUserAccountType" name="ldapUserAccountType" class="Field300" size="6">
										<option value="ad" %%GLOBAL_LdapActiveDirectoryAccount%%>%%LNG_LdapActiveDirectoryAccount%%</option>
										<option value="ed" %%GLOBAL_LdapEDirectoryAccount%%>%%LNG_LdapEDirectoryAccount%%</option>
										<option value="po2307" %%GLOBAL_LdapPosixAccountRfc2307%%>%%LNG_LdapPosixAccountRfc2307%%</option>
										<option value="po2307bis" %%GLOBAL_LdapPosixAccountRfc2307Bis%%>%%LNG_LdapPosixAccountRfc2307Bis%%</option>
										<option value="sam" %%GLOBAL_LdapSambaAccount%%>%%LNG_LdapSambaAccount%%</option>
										<option value="ot" %%GLOBAL_LdapOtherAccount%%>%%LNG_LdapOtherAccount%%</option>
									</select>
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapUserAccountType%%', '%%LNG_LdapUserAccountTypeHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapHost%%:
								</td>
								<td>
									<input type="text" name="ldapHost" id="ldapHost" value="%%GLOBAL_ldapHost%%" class="Field300">
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapHost%%', '%%LNG_LdapHostHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapPort%%:
								</td>
								<td>
									<input type="text" name="ldapPort" id="ldapPort" value="%%GLOBAL_ldapPort%%" class="Field40">
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapPort%%', '%%LNG_LdapPortHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									&nbsp;&nbsp;&nbsp;%%LNG_LdapFollowReferral%%?
								</td>
								<td>
									<select id="ldapFollowReferral" name="ldapFollowReferral" class="Field300">
										<option value="1"%%GLOBAL_LdapFollowReferralYes%%>%%LNG_LdapFollowReferralYes%%</option>
										<option value="0"%%GLOBAL_LdapFollowReferralNo%%>%%LNG_LdapFollowReferralNo%%</option>
									</select>
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapFollowReferral%%', '%%LNG_LdapFollowReferralHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									&nbsp;&nbsp;&nbsp;%%LNG_LdapVersionThree%%?
								</td>
								<td>
									<select id="ldapVersionThree" name="ldapVersionThree" class="Field300">
										<option value="1"%%GLOBAL_LdapVersionThreeYes%%>%%LNG_LdapVersionThreeYes%%</option>
										<option value="0"%%GLOBAL_LdapVersionThreeNo%%>%%LNG_LdapVersionThreeNo%%</option>
									</select>
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapVersionThree%%', '%%LNG_LdapVersionThreeHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>

							<tr>
								<td class="FieldLabel">
									&nbsp;&nbsp;&nbsp;%%LNG_LdapNegotiateTLS%%?
								</td>
								<td>
									<input type="checkbox" name="ldapNegoTLS" id="ldapNegoTLS" %%GLOBAL_YesLdapNegoTLS%%>
									<label for="ldapNegoTLS">%%LNG_YesLdapNegoTLS%%</label>
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapNegotiateTLS%%', '%%LNG_LdapNegotiateTLSHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapSearchString%%:
								</td>
								<td>
									<input type="text" name="ldapSearchString" id="ldapSearchString" value="%%GLOBAL_ldapSearchString%%" class="Field300">
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapSearchString%%', '%%LNG_LdapSearchStringHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapBaseDn%%:
								</td>
								<td>
									<input type="text" name="ldapBaseDn" id="ldapBaseDn" value="%%GLOBAL_ldapBaseDn%%" class="Field300">
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapBaseDn%%', '%%LNG_LdapBaseDnHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapConnectUsername%%:
								</td>
								<td>
									<input type="text" name="ldapConnectUsername" id="ldapConnectUsername" value="%%GLOBAL_ldapConnectUsername%%" class="Field300">
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapConnectUsername%%', '%%LNG_LdapConnectUsernameHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapConnectPassword%%:
								</td>
								<td>
									<input type="password" name="ldapConnectPassword" id="ldapConnectPassword" value="%%GLOBAL_ldapConnectPassword%%" class="Field300">
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapConnectPassword%%', '%%LNG_LdapConnectPasswordHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="Gap" colspan="2">&nbsp;</td>
							</tr>
						</table>
						<table class="Panel"  id="ldapSyncSetting">
							<tr>
								<td class="Heading2" colspan=2>%%LNG_LdapSyncSettings%%</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapFirstnameMapto%%:
								</td>
								<td>
									<input type="text" name="ldapFirstnameMapto" id="ldapFirstnameMapto" value="%%GLOBAL_ldapFirstnameMapto%%" class="Field300">
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapFirstnameMapto%%', '%%LNG_LdapFirstnameMaptoHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapLastnameMapto%%:
								</td>
								<td>
									<input type="text" name="ldapLastnameMapto" id="ldapLastnameMapto" value="%%GLOBAL_ldapLastnameMapto%%" class="Field300">
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapLastnameMapto%%', '%%LNG_LdapLastnameMaptoHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapEmailMapto%%:
								</td>
								<td>
									<input type="text" name="ldapEmailMapto" id="ldapEmailMapto" value="%%GLOBAL_ldapEmailMapto%%" class="Field300">
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapEmailMapto%%', '%%LNG_LdapEmailMaptoHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapRemoveUser%%:
								</td>
								<td>
									<select id="ldapRemoveUser" name="ldapRemoveUser" class="Field300">
										<option value="0"%%GLOBAL_LdapRemoveUserOpt1%%>%%LNG_LdapRemoveUserOpt1%%</option>
										<option value="1"%%GLOBAL_LdapRemoveUserOpt2%%>%%LNG_LdapRemoveUserOpt2%%</option>
									</select>
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapRemoveUser%%', '%%LNG_LdapRemoveUserHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									&nbsp;&nbsp;&nbsp;%%LNG_LdapAllowUserUpdateDetails%%?
								</td>
								<td>
									<input type="checkbox" name="ldapAllowUserUpdateDetails" id="ldapAllowUserUpdateDetails" %%GLOBAL_YesLdapAllowUserUpdateDetails%%>
									<label for="ldapAllowUserUpdateDetails">%%LNG_YesLdapAllowUserUpdateDetails%%</label>
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapAllowUserUpdateDetails%%', '%%LNG_LdapAllowUserUpdateDetailsHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="Gap" colspan="2">&nbsp;</td>
							</tr>
						</table>
						<table class="Panel" id="ldapGroupEnableSetting">
							<tr>
								<td class="Heading2" colspan=3>%%LNG_LdapGroupMappingSetting%%</td>
							</tr>
							<tr id="ldapGroupDefaultAction">
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapDefaultAction%%:
								</td>
								<td>
									<select id="ldapDefaultAction" name="ldapDefaultAction" class="Field150">
										%%GLOBAL_defaultActionList%%
									</select>
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapDefaultAction%%', '%%LNG_LdapDefaultActionHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_LdapGroupMember%%:
								</td>
								<td>
									<input type="text" name="ldapGroupMemberAttb" id="ldapGroupMemberAttb" value="%%GLOBAL_ldapGroupMemberAttb%%" class="Field150">
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapGroupMember%%', '%%LNG_LdapGroupMemberAttributeHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									&nbsp;&nbsp;&nbsp;%%LNG_LdapEnableGroupMapping%%?
								</td>
								<td>
									<input type="checkbox" name="ldapEnableGroupMapping" id="ldapEnableGroupMapping" %%GLOBAL_YesLdapEnableGroupMapping%% onclick="ToggleLdapGroupSettings(this);">
									<label for="ldapEnableGroupMapping">%%LNG_YesLdapEnableGroupMapping%%</label>
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_LdapEnableGroupMapping%%', '%%LNG_LdapEnableGroupMappingHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td colspan="2" class="Gap">&nbsp;</td>
							</tr>
						</table>
						<table class="Panel" id="ldapGroupSetting">
							<tr>
								<td class="Heading2" colspan="3">%%LNG_MapGroup%%</td>
							</tr>
							<tr>
								<td colspan="3" style="padding:5px 10px 10px 10px">
									<div class="HelpInfo">
										<img align="left" src="images/info.gif"/> %%LNG_LdapGroupMappingInfo%%
									</div>
									<table width="800" border="0">
										<tr>
											<td>
												<div id="outerldapgroup">
													<strong>%%LNG_LdapGroups%%</strong> (<a id="ldapClickToRefresh" onClick="GetLdapGroup(document.getElementById('ldapgroups')); return false;" href="#">%%LNG_LdapRefreshGroup%%</a>)<br />
													<select name="ldapgroup[]" id="ldapgroups" size="10" class="Field400" onclick="preSelectLocalGroups(this);">
														<option value=""> -- %%LNG_RefreshGroupList%% -- </option>
													</select>
												</div>
											</td>
											<td style="padding-top:6px">
												<strong>%%LNG_LocalGroups%%</strong>
												<div id="outerdbgroup">
													<select id="dbgroup" class="Field400 ISSelectReplacement" style="height: 127px" name="dbgroup[]" multiple="multiple"  size="5" >
														%%GLOBAL_groupList%%
													</select>
												</div>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			</div>
			
			
			
			
			
			
			
			
			
			
			
			
			
			<div id="div5" style="display: none">
				<table class="Panel">
				<tr>
					<td class="Heading2" colspan="2">%%LNG_PublicAccessSecurity%%</td>
				</tr>
				<tr>
					<td class="FieldLabel">
					%%LNG_PasswordProtectFrontend%%
					</td>
					<td>
						<input type="checkbox" onclick="ToggleFrontAccess(this);" name="frontendToggle" id="frontendToggle">
						<label for="frontendToggle">%%LNG_YesPasswordProtectFrontend%%</label>
						<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_PasswordProtectFrontend%%', '%%LNG_PasswordProtectFrontendHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
					</td>
				</tr>
				<tr id="frontaccess">
					<td colspan="2">
					<div >
						<table cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_FrontendUser%%:
								</td>
								<td>
									<img  style="padding-left:1px;" src="images/nodejoin.gif" height="20" width="20" alt="stalk">
									<input type="text" name="frontendUser" id="frontendUser" value="%%GLOBAL_frontendUser%%" class="Field150">
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_FrontendUser%%', '%%LNG_FrontendUserHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_FrontendPass%%:
								</td>
								<td>
									<img  style="padding-left:1px;" src="images/nodejoin.gif" height="20" width="20" alt="stalk">
									<input type="password" name="frontendPass" id="frontendPass" value="%%GLOBAL_frontendPass%%" class="Field150">
									<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_FrontendPass%%', '%%LNG_FrontendPassHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
						</table>
						</div>
					</td>
				</tr>
				<tr>
					<td class="Gap">&nbsp;</td>
				</tr>
				</table>
			
				<table class="Panel">
				<tr>
					<td class="Heading2" colspan="2">%%LNG_LoginSecuritySettings%%</td>
				</tr>
				<tr>
					<td class="FieldLabel">
					%%LNG_EnabledLoginSecurity%%
					</td>
					<td>
						<input type="checkbox" onclick="ToggleLoginSecurity(this);" name="enableLoginSecurity" id="enableLoginSecurity">
						<label for="enableLoginSecurity">%%LNG_YesEnabledLoginSecurity%%</label>
						<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_EnabledLoginSecurity%%', '%%LNG_EnabledLoginSecurityHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
					</td>
				</tr>
				<tr id="loginsecurity">
					<td colspan="2">
					<div >
						<table cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_BannedPeriod%%:
								</td>
								<td>
									<img  style="padding-left:1px;" src="images/nodejoin.gif" height="20" width="20" alt="stalk">
									<input type="text" name="bannedPeriod" id="bannedPeriod" value="%%GLOBAL_bannedPeriod%%" class="Field40"> %%LNG_Minutes%%
									<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_BannedPeriod%%', '%%LNG_BannedPeriodHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
							<tr>
								<td class="FieldLabel">
									<span class="Required">*</span>&nbsp;%%LNG_BannedRetried%%:
								</td>
								<td>
									<img  style="padding-left:1px;" src="images/nodejoin.gif" height="20" width="20" alt="stalk">
									<input type="text" name="bannedRetried" id="bannedRetried" value="%%GLOBAL_bannedRetried%%" class="Field40">
									<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_BannedRetried%%', '%%LNG_BannedRetriedHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
								</td>
							</tr>
						</table>
						</div>
					</td>
				</tr>
				<tr>
					<td class="Gap">&nbsp;</td>
				</tr>
				</table>
			
				<table class="Panel" style="display:%%GLOBAL_l%%;">
				<tr>
					<td class="Heading2" colspan="2">%%LNG_WorkflowSecuritySettings%%</td>
				</tr>
				<tr>
					<td class="FieldLabel">
					%%LNG_ShowDisapprovedArticles%%
					</td>
					<td>
						<input type="checkbox" name="showDisapprovedArticles" id="showDisapprovedArticles" %%GLOBAL_YesShowDisapprovedArticles%%>
						<label for="showDisapprovedArticles">%%LNG_YesShowDisapprovedArticles%%</label>
						<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_ShowDisapprovedArticles%%', '%%LNG_ShowDisapprovedArticlesHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
					</td>
				</tr>
				<tr>
					<td class="FieldLabel">
					%%LNG_AllowsOwnerEditDisapprovedArticles%%
					</td>
					<td>
						<input type="checkbox" name="allowsOwnerEditDisapprovedArticles" id="allowsOwnerEditDisapprovedArticles" %%GLOBAL_YesAllowsOwnerEditDisapprovedArticles%%>
						<label for="allowsOwnerEditDisapprovedArticles">%%LNG_YesAllowsOwnerEditDisapprovedArticles%%</label>
						<img onmouseout="HideHelp(this)" onmouseover="ShowHelp(this, '%%LNG_AllowsOwnerEditDisapprovedArticles%%', '%%LNG_AllowsOwnerEditDisapprovedArticlesHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
					</td>
				</tr>
				<tr>
					<td class="Gap">&nbsp;</td>
				</tr>
				</table>

				
			</div>
			
			
			
			
			
			
			
			
			
			
			
			
			
			

			<div id="div3" style="display: none">
			<input type="hidden" name="tempDirectory" value="%%GLOBAL_tempDirectory%%" />
			<table class="Panel">
			<tr>
				<td class="Heading2" colspan=2>%%LNG_MiscellaneousSettings%%</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_UseWYSIWYGEditor%%?
				</td>
				<td>
					<input type="checkbox" name="useWYSIWYGEditor" id="useWYSIWYGEditor" %%GLOBAL_YesUseWYSIWYGEditor%%> <label for="useWYSIWYGEditor">%%LNG_YesUseWYSIWYGEditor%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_UseWYSIWYGEditor%%', '%%LNG_UseWYSIWYGEditorHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_UseCaptchaCheck%%?
				</td>
				<td>
					<input type="checkbox" name="useCaptchaCheck" id="useCaptchaCheck" %%GLOBAL_YesUseCaptchaCheck%%> <label for="useCaptchaCheck">%%LNG_YesUseCaptchaCheck%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_UseCaptchaCheck%%', '%%LNG_UseCaptchaCheckHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_EmailOnUnhelpfulRating%%?
				</td>
				<td>
					<input type="checkbox" name="emailOnUnhelpfulRating" id="emailOnUnhelpfulRating" %%GLOBAL_YesEmailOnUnhelpfulRating%%> <label for="emailOnUnhelpfulRating">%%LNG_YesEmailOnUnhelpfulRating%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_EmailOnUnhelpfulRating%%', '%%GLOBAL_EmailOnUnhelpfulRatingHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_CleanUrls%%?
				</td>
				<td>
					<input type="checkbox" name="cleanUrls" id="cleanUrls" %%GLOBAL_YesCleanUrls%%> <label for="cleanUrls">%%LNG_YesCleanUrls%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_CleanUrls%%', '%%LNG_CleanUrlsHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_EnableSubscribeToQuestions%%?
				</td>
				<td>
					<input type="checkbox" name="allowSubscribeToQuestions" id="allowSubscribeToQuestions" %%GLOBAL_YesEnableSubscribeToQuestions%%> <label for="allowSubscribeToQuestions">%%LNG_YesEnableSubscribeToQuestions%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_EnableSubscribeToQuestions%%', '%%LNG_EnableSubscribeToQuestionsHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_SendCommentEmail%%?
				</td>
				<td>
					<input type="checkbox" name="sendCommentEmail" id="sendCommentEmail" %%GLOBAL_YesSendCommentEmail%%> <label for="sendCommentEmail">%%LNG_YesSendCommentEmail%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_SendCommentEmail%%', '%%LNG_SendCommentEmailHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_RestrictionOptions%%?
				</td>
				<td>
					<input type="hidden" name="categoryRestrictOption" value="1" />
					<input type="checkbox" name="categoryRestrictOption" id="categoryRestrictOption0" value="0" %%GLOBAL_categoryRestrictOption%%> <label for="categoryRestrictOption0">%%LNG_RestrictView%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_RestrictionOptions%%', '%%LNG_RestrictViewHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_CategoryStatusOverwrite%%
				</td>
				<td>
					<input type="checkbox" name="categoryStatusOverwrite" id="categoryStatusOverwrite" %%GLOBAL_YesCategoryStatusOverwrite%%> <label for="categoryStatusOverwrite">%%LNG_YesCategoryStatusOverwrite%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_CategoryStatusOverwrite%%', '%%LNG_CategoryStatusOverwriteHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_DefaultSearchType%%:
				</td>
				<td>
					<select id="defaultSearchType" name="defaultSearchType" class="Field300" onchange="ToggleFulltextPopulation(this.value);">
						<option value="1"%%GLOBAL_SearchType1%%>%%GLOBAL_LNG_FulltextSearch%%</option>
						<option value="2"%%GLOBAL_SearchType2%%>%%GLOBAL_LNG_KeywordSearch%%</option>
						<option value="3"%%GLOBAL_SearchType3%%>%%GLOBAL_LNG_BooleanFulltextSearch%%</option>
					</select>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_DefaultSearchType%%', '%%GLOBAL_LNG_DefaultSearchTypeHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr id="fulltextpopulation">
				<td class="FieldLabel">
					&nbsp;
				</td>
				<td>
					<img src="images/nodejoin.gif" height="20" width="20" alt="stalk">
					<input type="checkbox" id="enableFullindexPopulation" name="enableFullindexPopulation" %%GLOBAL_YesFullTextPopulationChecked%%> <label for="enableFullindexPopulation">%%LNG_YesFullTextPopulation%%</label>
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_FullTextPopulation%%', '%%LNG_FullTextPopulationHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_IgnoreSearchTerms%%:
				</td>
				<td>
					<input type="text" name="skipWords" value="%%GLOBAL_skipWords%%" class="Field300">
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_IgnoreSearchTerms%%', '%%LNG_IgnoreSearchTermsHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					&nbsp;&nbsp;&nbsp;%%LNG_CookiePrefix%%:
				</td>
				<td>
					<input type="text" name="cookiePrefix" value="%%GLOBAL_cookiePrefix%%" class="Field300">
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_CookiePrefix%%', '%%LNG_CookiePrefixHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="FieldLabel">
					<span class="required">*</span>&nbsp;%%LNG_ContactEmail%%:
				</td>
				<td>
					<input type="text" name="contactEmail" id="contactEmail" value="%%GLOBAL_contactEmail%%" class="Field300">
					<img onmouseout="HideHelp(this)" onMouseOver="ShowHelp(this, '%%LNG_ContactEmail%%', '%%LNG_ContactEmailHelp%%')" src="images/help.gif" width="24" height="16" border="0" alt="help">
				</td>
			</tr>
			<tr>
				<td class="Gap" colspan="2">&nbsp;</td>
			</tr>
			</table>
			</div>
			<table class="OuterPanel">
				<tr>
					<td class="FieldLabel">&nbsp;</td>
					<td>
					<br />
						<input type="submit" name="SubmitButton2" value="%%LNG_Save%%" class="FormButton">
						<input type="button" name="CancelButton2" value="%%LNG_Cancel%%" class="FormButton" onClick="ConfirmCancel()">
					</td>
				</tr>
			</table>
		</td>
	</tr>
	</table>

	</form>
</div>
	<script>
		togglesmtp(%%GLOBAL_SMTPIntialToggle%%);
		toggleinlinehelp(%%GLOBAL_InlineHelpOptionToggle%%);
	</script>

</div>